package org.gw.building.repositories;

import org.gw.building.model.Slide;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

public interface SlideRepository extends CrudRepository<Slide, String> {

	@Query("from Slide s where (?1 is null or s.name like(?1)) order by s.scsj desc")
	public Page<Slide> query(String name, Pageable pageable);

	public List<Slide> findByStatus(int i);

}
